<template>
  <div>
    <div v-if="show" class="modal-wrap" @click="show = false"></div>
    <div v-if="show" class="modal-contenr-wrap">
      <div class="title">{{ dataList.title }}</div>
      <div class="content">
        <div class="content-item" v-for="(item, index) in dataList.content" :key="index">
          <div v-if="item.title" class="h1">{{ item.title }}</div>
          <div class="font" v-for="(jtem, jndex) in item.content" :key="jndex">{{ jtem }}</div>
        </div>
      </div>

        <div class="btn-wrap">
          <div class="left-btn" @click="show = false">我知道了</div>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    dataList: {
      type: Object,
      default: {}
    },
  },
  data() {
    return {
      show: false
    }
  }
}
</script>
<style lang="less" scoped>
.modal-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9;
}

.modal-contenr-wrap {
  position: absolute;
  width: 345px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 27px;
  box-sizing: border-box;
  border-radius: 10px;
  background: linear-gradient(2deg, #FFF 51.94%, #4BCEE3 97.18%);
  z-index: 10;

  .title {
    color: rgba(0, 0, 0, 0.85);
    text-align: center;
    font-size: 24px;
    font-weight: bold;
  }

  .content {
    color: rgba(0, 0, 0, 0.65);
    font-size: 18px;
    margin-top: 24px;
    height: 50vh;
    overflow-y: auto;

    .content-item {
      margin-top: 10px;
    }

    .h1 {
      font-size: 20px;
      font-weight: 600;
      line-height: 30px;
    }

    .font {
      font-size: 16px;
      line-height: 20px;
    }
  }
}


.btn-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;

  .left-btn {
    width: 160px;
    height: 48px;
    flex-shrink: 0;
    color: #00AFCB;
    border-radius: 48px;
    background: #F6F6F6;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 48px;
  }
}
</style>